<template>
  <div>
    <img src="./assets/logo.png" alt="logo" srcset="" />
    <h1 ref="title">我是App组件</h1>
    <School ref="school" />
    <Student ref="student" />
    <button @click="showRef">点击输出ref</button>
  </div>
</template>

<script>
export default {
  name: "App",
  components: {
    School: () => import("./components/School.vue"),
    Student: () => import("./components/Student.vue"),
  },
  methods: {
    showRef() {
      console.log(this.$refs.title);
      console.log(this.$refs.school);
      console.log(this.$refs.student);
    },
  },
};
</script>
